const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = (key) => {
  return {
    mode: 'development',
    entry: path.resolve(__dirname, 'app.js'),
    output: {
      path: path.resolve(__dirname, `../../dist/${key}`),
      filename: `${key}.bundle.js`,
    },
    plugins: [
      new HtmlWebpackPlugin({
        filename: `${key}.html`
      })
    ]
  }
};